package com.report.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.report.bean.Student;
import com.report.dao.StudentDAO;

@Service
public class StudentServiceImpl implements StudentService {

	@Autowired
	private StudentDAO studentDAO;
	
	@Transactional
	public void addStudent(Student st) {
		// TODO Auto-generated method stub
		studentDAO.addStudent(st);
	}

	@Transactional
	public List<Student> listStudent() {
		// TODO Auto-generated method stub
		return studentDAO.listStudent();
	}

	@Transactional
	public void removeStudent(Integer id) {
		// TODO Auto-generated method stub
		studentDAO.removeStudent(id);
	}

}
